/*
 * @Descripttion: 基础解码
 * @Version: 1.0
 * @Author: undead
 * @Date: 2022-02-08 14:27:00
 * @LastEditors: undead
 * @LastEditTime: 2022-02-08 14:42:06
 */
const astUtils = require("./ast-utils");
const traverse = require("@babel/traverse").default;
const generator = require("@babel/generator").default;
module.exports = {
  name: "jsjiami.com.v6",
  checkFeature: (nodes) => true,
  init: (nodes) => {
    //function转成String 并将 十六进制文本还原
    // traverse(nodes, {
    //   CallExpression: astUtils.fnConverString,
    //   StringLiteral: astUtils.restoreExtra,
    //   NumericLiteral: astUtils.restoreExtra,
    // });

    generator(nodes, {
      jsescOption: {
        minimal: true, // 自动转义
      },
    });

    return nodes;
  },
};
